import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Login',
        component: () => import('../views/Login.vue')
    },

    {
        path: '/Home',
        name: 'Home',
        redirect: "/main",
        component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue'),
        children: [
            {
                path: "/main",
                component: () => import("../views/Main.vue")
            },
            {
                path: "/system/dept",
                component: () => import("../views/system/Dept.vue")
            },
            {
                path: "/system/user",
                component: () => import("../views/system/User.vue")
            },
            {
                path: "/system/menu",
                component: () => import("../views/system/Menu.vue")
            },
            {
                path: "/system/role",
                component: () => import("../views/system/Role.vue")
            },
            {
                path: "/system/dict",
                component: () => import("../views/system/Dict.vue")
            },
            {
                path: "/dict/data/:dictId",
                component: () => import("../views/system/Data.vue")
            },
            {
                path: "/system/notice",
                component: () => import("../views/system/Notice.vue")
            },
            {
                path: "/system/noticeHome",
                component: () => import("../views/system/NoticeHome.vue")
            },

            {
                path: "/system/log_login",
                component: () => import("../views/system/LoginInfo.vue")
            },
            {
                path: "/system/log_opt",
                component: () => import("../views/system/OperLog.vue")
            },
            {
                path: "/system/news",
                component: () => import("../views/system/News.vue")
            },

            {
                path: '/news/:id',
                name: 'NewsDetail',
                component: () => import("../views/system/News.vue")
            },
            {
                path: "/charge/docharge",
                component: () => import("../views/charge/DoCharge.vue")
            },
            {
                path: "/system/reg_fee",
                component: () => import("../views/system/RegFee.vue")
            },
            {
                path: "/system/ins_fee",
                component: () => import("../views/system/InsFee.vue")
            },
            {
                path: "/charge/chargelist",
                component: () => import("../views/charge/ChargeList.vue")
            },
            {
                path: "/charge/backfee",
                component: () => import("../views/charge/BackFee.vue")
            },
            {
                path: "/charge/backfeelist",
                component: () => import("../views/charge/BackFeeList.vue")
            },
            {
                path: "/charge/dispensing",
                component: () => import("../views/charge/Dispensing.vue")
            },
            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  收费管理 end  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            {
                path: "/statistics/revenueHome",
                component: () => import('../views/statistics/RevenueHome.vue')
            },
            {
                path: "/stock/medicinal",
                component: () => import("../views/stock/Medicines.vue")
            },
            {
                path: "/stock/producter",
                component: () => import("../views/stock/Producer.vue")
            },
            {
                path: "/stock/provider",
                component: () => import("../views/stock/Provider.vue")
            },
            {
                path: "/stock/purchase",
                component: () => import("../views/stock/Purchase.vue")
            },
            {
                path: "/stock/purchase/newPurchase",
                component: () => import("../views/stock/NewPurchase.vue")
            },
            {
                path: "/stock/purchase/editPurchase/**",
                component: () => import("../views/stock/EditPurchase.vue")
            },
            {
                path: "/stock/examine",
                component: () => import("../views/stock/AuditList.vue")
            },
            {
                path: "/stock/inventory",
                component: () => import("../views/stock/InventoryLog.vue")
            },


            {
                path: "/charge/docharge",
                component: () => import("../views/charge/DoCharge.vue")
            },
            {
                path: "/charge/chargelist",
                component: () => import("../views/charge/ChargeList.vue")
            },
            {
                path: "/charge/backfee",
                component: () => import("../views/charge/BackFee.vue")
            },
            {
                path: "/charge/backfeelist",
                component: () => import("../views/charge/BackFeeList.vue")
            },
            {
                path: "/charge/dispensing",
                component: () => import("../views/charge/Dispensing.vue")
            },
            {
                path: "/statistics/check",
                component: () => import("../views/statistics/Check.vue")
            },
            {
                path: "/statistics/sales",
                component: () => import("../views/statistics/Sales.vue")
            },
            {
                path: "/statistics/workload",
                component: () => import("../views/statistics/Workload.vue")
            },
            {
                path: "/statistics/comment",
                component: () => import("../views/statistics/Comment.vue")
            },
            {
                path: "/statistics/revenue",
                component: () => import("../views/statistics/Revenue.vue")
            },
            {
                path: "/system/user/info",
                component: () => import("../views/system/UserInfo.vue")
            },
            {
                path: "/user/info",
                component: () => import("../views/system/UserInfo.vue")
            },
            {
                path: "/doctor/Myscheduling",
                component: () => import("../views/doctor/Myscheduling.vue")
            },
            {
                path: "/doctor/Newcare",
                component: () => import("../views/doctor/Newcare.vue")
            },
            {
                path: "/doctor/Patient",
                component: () => import("../views/doctor/Patient.vue")
            },
            {
                path: "/doctor/Registered",
                component: () => import("../views/doctor/Registered.vue")
            },
            {
                path: "/doctor/RegisteredList",
                component: () => import("../views/doctor/RegisteredList.vue")
            },
            {
                path: "/doctor/Scheduling",
                component: () => import("../views/doctor/Schedule.vue")
            },
            {
                path: "/doctor/Reservation",
                component: () => import("../views/doctor/Reservation.vue")
            },
            {
                path:"/check/docheck",
                component:()=>import("../views/checkResult/NewCheck.vue")
            },
            {
                path:"/check/checkresult",
                component:()=>import("../views/checkResult/ResultEntry.vue")
            },
            {
                path:"/check/checklist",
                component:()=>import("../views/checkResult/ResultQuery.vue")
            },

        ]
    },
    {
        path: "/main",
        name: "Main",
        component: () => import("../views/Main.vue"),
    },
]

const router = new VueRouter({
    routes
})

export default router
